/**
 * 
 */
package com.learn.security.securitydemo.validator;

import javax.validation.Constraint;
import javax.validation.Payload;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

/**
 * @author cici
 *
 */
@Target({ElementType.METHOD, ElementType.FIELD}) //这个注解是指：此注解能用在哪里
@Retention(RetentionPolicy.RUNTIME)//什么时候用的注解
@Constraint(validatedBy = MyConstraintValidator.class)//注解校验类
public @interface MyConstraint {
	
	String message();

	Class<?>[] groups() default { };

	Class<? extends Payload>[] payload() default { };
	
	String field() default "";

}
